-
Notifications
You must be signed in to change notification settings - Fork 52
Fixed creating ingresses without admin access #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed creating ingresses without admin access #407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good I think. Just small nit. See comment.
Perhaps in separate issue I think we should explore having the SDK create Route CRs directly (without using a ingresss) if is_openshift true so the OCP users don't need to provide domain_name.
097a9db
to
eb36887
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments, otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my OpenShift Cluster. I run the following from notebook
# Create our cluster and submit appwrapper
namespace = "default"
cluster_name = "hfgputest-1"
local_interactive = True
cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive,
namespace=namespace,
name=cluster_name,
num_workers=1,
min_cpus=1,
max_cpus=1,
min_memory=4,
max_memory=4,
num_gpus=0,
image="quay.io/project-codeflare/ray:latest-py39-cu118",
instascale=False,
machine_types=["m5.xlarge", "p3.8xlarge"],
head_cpus=1,
head_memory=2,
))
and got this error:
File ~/codeflare-sdk/src/codeflare_sdk/utils/generate_yaml.py:434, in enable_local_interactive(resources, cluster_name, namespace, ingress_domain)
431 command = command.replace("deployment-name", cluster_name)
433 if ingress_domain is None:
--> 434 raise ValueError(
435 "ingress_domain is invalid. For creating the client route/ingress please specify an ingress domain"
436 )
437 else:
438 domain = ingress_domain
ValueError: ingress_domain is invalid. For creating the client route/ingress please specify an ingress domain
For OpenShift cluster, we shouldn't need to provide ingress_domain to update Route. Is this intended ?
@tedhtchang |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: astefanutti, tedhtchang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Bobbins228, as @tedhtchang pointed out, I'd assume it's not required for users to provide the domain on OpenShift. The host/domain is automatically generated for Route if not provided, and can be retrieved from the Route resource once it got admitted. |
@astefanutti Yes this is true. Before we were gathering the domain through that Cluster instance but it has to be removed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've run through the local_interactive notebook on a hypershift/openshift cluster. Everything runs fine. Both routes and Ingresses are created - is this expected?
Only routes should be created. Just tested it out and only routes were created on my end. |
Sure.
|
The above issue was a local issue. I can confirm that I was able to successfully run through the local interactive notebook on OpenShift - with routes being successfully created (when an ingress_domain is provided) and on KinD with ingresses being successfully created. |
bed135a
to
7ab2122
Compare
In trying to recreate the issue reported here I found without the changes in this PR that the ray dashboard route is not created correctly and does not allow access to the dashboard. With these changes it is created and can be accessed. I think that we should merge this PR and continue improving the overall area by working on each of the other related issues that follow on from here. |
7ab2122
to
6b5e93f
Compare
/lgtm |
Let's merge it as it improves things significantly already. We can address the remaining points separately. |
Issue link
Closes #400
What changes have been made
Notable changes:
config.openshift.io.ingresses
and opted for the creation of routes when on OpenShift.mcad=False
in cluster configurationroute.openshift.io
api group. (This should resolve cluster level privileges issue)Verification steps
mcad=False
to verify ingresses are created/deletedChecks